package cn.tedu.logistics.service;

import cn.tedu.logistics.bean.Purview;
import cn.tedu.logistics.dao.PurviewDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PurviewServiceImpl implements PurviewService {
    @Autowired
    private PurviewDao purviewMapper;
    @Override
    public List<Purview> readPurview() {
        return purviewMapper.readPurview();
    }

    @Override
    public void updatePurview(Purview p) {
        purviewMapper.updatePurview(p);
    }

    @Override
    public void deleteById(Integer id) {
        purviewMapper.deleteById(id);
    }

    @Override
    public Purview PurviewById(int id) {
        return purviewMapper.PurviewById(id);
    }

    @Override
    public int addManager(String username, String md5password) {

        return purviewMapper.addManager(username,md5password);
    }

    @Override
    public void addPurviews() {
        purviewMapper.addPurviews();
    }
}
